home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Páginas y transformaciones / PrintableTenCentimeterRuler / PrintableTenCentimeterRuler.cs next >
Encoding:
Text File  |  2002-05-06  |  716 b   |  24 lines

  1. //----------------------------------------------------------
  2. // PrintableTenCentimeterRuler.cs ⌐ 2001 by Charles Petzold
  3. //----------------------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class PrintableTenCentimeterRuler: TenCentimeterRuler
  9. {
  10.      public new static void Main()
  11.      {
  12.           Application.Run(new PrintableTenCentimeterRuler());
  13.      }
  14.      public PrintableTenCentimeterRuler()
  15.      {
  16.           Text =   Text + " imprimible";
  17.      }
  18.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  19.      {
  20.           grfx.PageUnit = GraphicsUnit.Pixel;
  21.           base.DoPage(grfx, clr, cx, cy);
  22.      }
  23. }
  24.